# 方法1
a = '1, 2, 3, 4, 5, 6, 7, 8, 9'
b = input(':')
[print(f'对应的字符串是{b}') for i in a if i == b]

# 方法2
a = 'Hello world'
b = 'd'
print(a.find(b)) # 用于在字符串中查找子字符串的位置,返回位置的数